Add "serviceName" and "serviceType" to bot and chat logger
Summary:
Make each adapter provide a "serviceType" (campfire, flowdock, IRC) and "serviceName" (irc network / chat server) so that we can disambiguate between, e.g., "#phabricator on EFNet" and "#phabricator on FreeNode".
Make the chatlog handler ship them over Conduit.
Also fix some "policy can not be null" bugs with chatlog recording.
Test Plan:
Verified data inserted correctly:
mysql> select * from chatlog_channel;
+----+------------------+-------------+--------------+------------+------------+-------------+--------------+
| id | serviceName | serviceType | channelName | viewPolicy | editPolicy | dateCreated | dateModified |
+----+------------------+-------------+--------------+------------+------------+-------------+--------------+
| 1 | irc.freenode.net | IRC | #phabricator | users | users | 1361201689 | 1361201689 |
+----+------------------+-------------+--------------+------------+------------+-------------+--------------+
1 row in set (0.00 sec)
mysql> select * from chatlog_event where channelID = 1;
+----+--------------+------------+------------+------+---------------+--------------------------------+-----------+
| id | channel | epoch | author | type | message | loggedByPHID | channelID |
+----+--------------+------------+------------+------+---------------+--------------------------------+-----------+
| 45 | #phabricator | 1361201689 | epriestley | mesg | blip blip | PHID-USER-5bt2phfepag4cdvjtzg5 | 1 |
| 46 | #phabricator | 1361201700 | epriestley | mesg | boop boop bip | PHID-USER-5bt2phfepag4cdvjtzg5 | 1 |
+----+--------------+------------+------------+------+---------------+--------------------------------+-----------+
2 rows in set (0.00 sec)
Reviewers: Afaque_Hussain, indiefan
Reviewed By: Afaque_Hussain
CC: aran
Maniphest Tasks: T837
Differential Revision: https://secure.phabricator.com/D4996